package com.smartstate.dataManagement.service.impl;

import cn.hutool.core.date.DateTime;
import cn.hutool.extra.expression.ExpressionUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smartstate.dataManagement.dto.EnergyDTO;
import com.smartstate.dataManagement.dto.PageDTO;
import com.smartstate.dataManagement.entity.Carbor;
import com.smartstate.dataManagement.entity.HalfHourPowerMeterSummaryEntity;
import com.smartstate.dataManagement.mapper.CarbonTraceMapper;
import com.smartstate.dataManagement.mapper.PowerMeterSummaryMapper;
import com.smartstate.dataManagement.service.CarbonTraceService;
import com.smartstate.dataManagement.service.EnergyPanelService;
import com.smartstate.dataManagement.service.ObjMoudelService;
import com.smartstate.dataManagement.util.MyExpressionUtil;
import com.smartstate.dataManagement.util.PowerMeterSummaryUtils;
import com.smartstate.dataManagement.vo.PowerVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;

@Service
public class CarbonTraceServiceImpl extends ServiceImpl<CarbonTraceMapper, Carbor> implements CarbonTraceService {
    @Resource
    private CarbonTraceMapper carbonTraceMapper;
   
    @Resource
    private ObjMoudelService objMoudelService;

    @Resource
    private PowerMeterSummaryMapper powerMeterSummaryMapper;
    
    @Override
    public Page<Carbor> queryAllPageByDTO(PageDTO pageDTO) {
        return null;
    }

    @Override
    public List<Map<String, Map<String, List<PowerVo>>>> queryCarbonTrace(EnergyDTO energyDTO) {
        List<Map<String, Object>> carborTree = getCarborTree(energyDTO);
        return null;
    }

    public List<Map<String, Object>> getCarborTree(EnergyDTO energyDTO) {
       return null;
    }
}
